import notice from '../../../api/config/notice'

/**
 * 查询系统公告 设置
 * @param data {}
 */
export const queryNoticeList = ({ commit, state, rootState }, data) => {
  return notice.queryNoticeList(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}
/**
 * 创建系统公告 设置
 * @param data {}
 */
export const createNotice = ({ commit, state, rootState }, data) => {
  return notice.createNotice(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}
/**
 * 更新系统公告 设置
 * @param data {}
 */
export const updateNotice = ({ commit, state, rootState }, data) => {
  return notice.updateNotice(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}
export const deleteNoticeAttach = ({ commit, state, rootState }, data) => {
  return notice.deleteNoticeAttach(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}
/**
 * 通过id查询系统公告 设置
 * @param data {}
 */
export const getNoticeById = ({ commit, state, rootState }, data) => {
  return notice.getNoticeById(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}
/**
 * 通过id查询已阅公告的座席 设置
 * @param data {}
 */
export const getReadSeatsById = ({ commit, state, rootState }, data) => {
  return notice.getReadSeatsById(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}
/**
 * 删除系统公告 设置
 * @param data {}
 */
export const deleteNotice = ({ commit, state, rootState }, data) => {
  return notice.deleteNotice(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}
/**
 * 查询日志管理
 * @param data {}
 */
export const queryBusOrCustLogList = ({ commit, state, rootState }, data) => {
  return notice.queryBusOrCustLogList(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}
/**
 * 恢复数据日志管理
 * @param data {}
 */
export const logDataRecovery = ({ commit, state, rootState }, data) => {
  return notice.logDataRecovery(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}
/**
 * 查询日志管理
 * @param data {}
 */
export const deleteBusOrCustLogList = ({ commit, state, rootState }, data) => {
  return notice.deleteBusOrCustLogList(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}
